package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BizPdf;
import com.nmf.dao.gen.bean.BizPdfExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizPdfMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @SelectProvider(type=BizPdfSqlProvider.class, method="countByExample")
    long countByExample(BizPdfExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @DeleteProvider(type=BizPdfSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizPdfExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @Delete({
        "delete from biz_pdf",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @Insert({
        "insert into biz_pdf (id, type, ",
        "user_id, user_name, ",
        "pdf_url, create_date, ",
        "update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=SMALLINT}, ",
        "#{userId,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, ",
        "#{pdfUrl,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizPdf record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @InsertProvider(type=BizPdfSqlProvider.class, method="insertSelective")
    int insertSelective(BizPdf record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @SelectProvider(type=BizPdfSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.SMALLINT),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="pdf_url", property="pdfUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizPdf> selectByExample(BizPdfExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @Select({
        "select",
        "id, type, user_id, user_name, pdf_url, create_date, update_date",
        "from biz_pdf",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="type", property="type", jdbcType=JdbcType.SMALLINT),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="pdf_url", property="pdfUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizPdf selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @UpdateProvider(type=BizPdfSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizPdf record, @Param("example") BizPdfExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @UpdateProvider(type=BizPdfSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizPdf record, @Param("example") BizPdfExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @UpdateProvider(type=BizPdfSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizPdf record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_pdf
     */
    @Update({
        "update biz_pdf",
        "set type = #{type,jdbcType=SMALLINT},",
          "user_id = #{userId,jdbcType=VARCHAR},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "pdf_url = #{pdfUrl,jdbcType=VARCHAR},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizPdf record);
}